public class Demo4ShellTicket {
    public static void main(String[] args) {


        //线程的唤醒 等待  wait：会导致被阻塞的线程等待直到被唤醒为止   notify：唤醒在等待这个锁的其他线程之一   notifyall：唤醒所有线程







//        SellTicket ticket = new SellTicket();
//        Thread t1 = new Thread(ticket,"窗口1");
//        Thread t2 = new Thread(ticket,"窗口2");
//        Thread t3 = new Thread(ticket,"窗口3");
//        Thread t4 = new Thread(ticket,"窗口4");

//        Thread t1 = new Thread(new SellTicket(),"窗口1");
//        Thread t2 = new Thread(new SellTicket(),"窗口2");
//        Thread t3 = new Thread(new SellTicket(),"窗口3");
//        Thread t4 = new Thread(new SellTicket(),"窗口4");
//        Thread t5 = new Thread(new SellTicket(),"窗口5");
//        Thread t6 = new Thread(new SellTicket(),"窗口6");
//        Thread t7 = new Thread(new SellTicket(),"窗口7");
//        Thread t8 = new Thread(new SellTicket(),"窗口8");
//        Thread t9 = new Thread(new SellTicket(),"窗口9");
//        Thread t10 = new Thread(new SellTicket(),"窗口10");
//        t1.start();
//        t2.start();
//        t3.start();
//        t4.start();
//        t5.start();
//        t6.start();
//        t7.start();
//        t8.start();
//        t9.start();
//        t10.start();
    }
}
